<template>
      <!--画廊-->
      <div class="gallary">
        <div class="wrapper" @click="close">
          <swiper :options="swiperOption">
            <swiper-slide class="slide-img">
              <img src="https://img1.qunarzz.com/sight/p0/1508/89/895a1b7add84f23faca053ce9e3153db.water.jpg_600x330_93d96bdf.jpg">
            </swiper-slide>
            <swiper-slide class="slide-img">
              <img src="https://img1.qunarzz.com/sight/p0/1508/89/895a1b7add84f23faca053ce9e3153db.water.jpg_600x330_93d96bdf.jpg">
            </swiper-slide>
            <div class="swiper-pagination" slot="pagination"></div>
          </swiper>
        </div>
      </div>
</template>

<script>
    export default {
        name: "Gallary",
        data () {
           return {
              swiperOption: {
                autoplay: 10000,
                pagination: ".swiper-pagination",
                paginationType: 'fraction',
                loop: true,
                observeParents: true,
                observe: true
              }
           }
        },
        methods : {
           close () {
              this.$emit('closeSwiper')
           }
        }
    }
</script>

<style lang="stylus" scoped>
  .gallary >>> .swiper-container{
     overflow: inherit
  }
  .gallary >>> .swiper-pagination-fraction {
      color : #ffffff
      bottom : -.5rem
  }
  .gallary{

      width : 100%
      background : #333333
      position : absolute
      top : 0
      left : 0
      bottom : 0
      display: flex
      flex-direction: column
      justify-content: center
      .wrapper{
         width : 100%
         background : white
         text-align: center
         margin : 0rem auto
         div{
            width : 100%
         }
      }
  }
</style>
